<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

<p:dataTable var="project" id="usersList" value="#{projectsListViewBean.projects}" rowKey="#{project.name}" paginator="true" rows="10"
	selection="#{projectsListViewBean.project}"  height="100" liveScroll="false" selectionMode="single">

	<!--   <p:ajax event="rowSelect" update=":form:display" oncomplete="carDialog.show()" />   -->

	<f:facet name="header">

		<h:outputText value="List of projects" />
	</f:facet>


	<p:column headerText="Project Name" sortBy="#{project.name}" filterBy="#{project.name}">  
            #{project.name}
        </p:column>

	<p:effect type="blind" event="click">
		<f:param name="direction" value="'horizontal'" />
	</p:effect>
</p:dataTable>
   <div style="height: 5px;">
</div>
   <p:commandButton update="usersList" value="New project" actionListener="#{projectsListViewBean.addUser}" />
      <p:commandButton update="usersList" value="Delete project" actionListener="#{projectsListViewBean.addUser}" />
</html>